﻿@model IEnumerable<Entities.Operation>
<script language="javascript" type="text/javascript">
    function onOperationsSelected(data) {
        $("#OperationTypes").val(data.Object);
        $('#OperationsDialog').dialog('close');
    }
</script>
@{
    AjaxOptions ajaxOpts = new AjaxOptions
    {
        HttpMethod = HttpVerbs.Post.ToString(),
        OnSuccess = "onOperationsSelected"
    };
}
@using (Ajax.BeginForm(MVC.Reports.Filters.SaveOperations(), ajaxOpts))
{
    @Html.CheckBoxList("OperationTypes",
                     x => Model,
                       x => x.OperationID,
                       x => x.OperationName,
                       x => new Entities.Operation[] { },
                       Position.Vertical)
    <input type="submit" value="Submit" />
}